//
//  SQLowRuleViewController.m
//  pai
//
//  Created by pro on 14-11-17.
//  Copyright (c) 2014年 linjunjing. All rights reserved.
//

#import "SQLowRuleViewController.h"

@interface SQLowRuleViewController ()

@end

@implementation SQLowRuleViewController
@synthesize scrollView = _scrollView;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [self setTitle:@"最低价竞拍规则"];
    
    [self setRules];
}

-(void)setRules
{
    
    
    
    NSString* contentstr = @"用户对商品进行竞价时，在截止时间后，所有出价中，是唯一的出价，且该出价是最低价时，该用户中标。\n\n其他用户将扣除竞拍款项，竞拍款项将转换成积分。\n\n转换比例为1：1\n";
    
    _scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, self.MyNavigationBar.frame.origin.y+self.MyNavigationBar.frame.size.height, 320, [[UIScreen  mainScreen] bounds].size.height - 44 - self.MyNavigationBar.frame.origin.y-self.MyNavigationBar.frame.size.height)];
    [_scrollView setBackgroundColor:[UIColor colorWithRed:240/255.0 green:240/255.0 blue:240/255.0 alpha:1]];
    [self.view addSubview:_scrollView];
    _scrollView.delegate = self;
    _scrollView.pagingEnabled = NO;
    _scrollView.scrollEnabled = YES;
    
    
    UILabel* contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 20, 280, 200)];
    [contentLabel setNumberOfLines:0];
    [contentLabel setTextColor:[UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1]];
    [contentLabel setFont:[UIFont systemFontOfSize:14]];
    [contentLabel setText:contentstr];
    [contentLabel sizeToFit];
    [_scrollView addSubview:contentLabel];
    
    _scrollView.contentSize = CGSizeMake(320,contentLabel.frame.size.height);
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
